﻿<Window x:Class="WebAppUploader.ProfileListDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:WebAppUploader"
        Title="Config List Editor" Height="500" Width="800">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition
                Width="300*" />
            <ColumnDefinition
                Width="478*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition
                />
            <RowDefinition
                Height="Auto" />
        </Grid.RowDefinitions>
        <StackPanel
            Grid.Row="1"
            Name="stackPanel1"
            HorizontalAlignment="Right"
            Grid.Column="1">
            
            <Button 
                Content="Close"
                Click="Button_Click"
                Height="30"
                Width="100" />
        </StackPanel>
        <Canvas
            Grid.Column="1"
            DataContext="{Binding SelectedItem, ElementName=listBox1}"
            Name="canvas1">
            <TextBox
                Canvas.Left="121"
                Canvas.Top="6"
                Height="23"
                Name="textBox1"
                Width="258" 
                Text="{Binding Name,Mode=TwoWay}"
                />
            <TextBox
                Canvas.Left="121"
                Canvas.Top="35"
                Height="23"
                Name="textBox2"
                Width="258"
                Text="{Binding IISHost,Mode=TwoWay}" />
            <Label
                Canvas.Left="62"
                Canvas.Top="33"
                Content="IIS Host:"
                Name="label1" 
                />
            <Label
                Canvas.Left="71"
                Canvas.Top="6"
                Content="Name:"
                Name="label2" />
            <TextBox
                Canvas.Left="121"
                Canvas.Top="64"
                Height="23"
                Name="textBox3"
                Width="258"
                Text="{Binding Port,Mode=TwoWay}" 
                />
            <Label
                Canvas.Left="80"
                Canvas.Top="62"
                Content="Port:"
                Name="label3" />
            <TextBox
                Canvas.Left="121"
                Canvas.Top="93"
                Height="23"
                Name="textBox4"
                Width="258"
                Text="{Binding Username,Mode=TwoWay}" />
            <Label
                Canvas.Left="49"
                Canvas.Top="91"
                Content="Username:"
                Name="label4" />
            <local:PasswordTextBox
                BorderBrush="Silver"
                BorderThickness="1"
                Canvas.Left="121"
                Canvas.Top="122"
                x:Name="passwordTextBox1"
                Width="258"
                Password="{Binding Password,Mode=TwoWay}" 
                />
            <Label
                Canvas.Left="53"
                Canvas.Top="122"
                Content="Password:"
                Name="label5" />
            <CheckBox
                Canvas.Left="121"
                Canvas.Top="150"
                Content="Upload Bin Folder"
                Name="checkBox1"
                IsChecked="{Binding UploadBin,Mode=TwoWay}"
                />
            <CheckBox
                Canvas.Left="121"
                Canvas.Top="172"
                Content="Upload Config Files"
                Name="checkBox2"
                IsChecked="{Binding UploadConfig,Mode=TwoWay}" />
            <CheckBox
                Canvas.Left="121"
                Canvas.Top="194"
                Content="Use SSL"
                Name="checkBox3"
                IsChecked="{Binding Secure,Mode=TwoWay}" />
        </Canvas>
        <ListBox
            Name="listBox1"
            ItemsSource="{Binding Profiles}"
            DisplayMemberPath="Name"
            />
        <Button
            Content="Add Profile"
            Grid.Row="1"
            Height="23"
            HorizontalAlignment="Left"
            Margin="0,3,0,0"
            Name="button1"
            VerticalAlignment="Top"
            Width="75" 
            Command="{Binding AddProfileCommand}"
            />
        <Button
            Content="Delete Profile"
            Grid.Row="1"
            Height="23"
            HorizontalAlignment="Left"
            Margin="211,4,0,0"
            Name="button2"
            VerticalAlignment="Top"
            Width="89" 
            Command="{Binding DeleteProfileCommand}"
            CommandParameter="{Binding SelectedItem, ElementName=listBox1}"
            />
    </Grid>
</Window>
